home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-04 | 44.9 KB | 1,183 lines |
- C.S.M.P. Digest Tue, 05 May 92 Volume 1 : Issue 72
-
- Today's Topics:
-
- Apple Events
- MPW Problems Subclassing an Object Pascal Object in C++
- MacApp Support Email Address
- q: why can't i see all my functions in macsbug?
- What is the Serial Port Arbitrator?!
- Speaking of WWDC, how about a netter's dinner?
- Do I get Null events in fg?
- using PixMapHandle^ with CopyBits (Pascal)?
- How to find the location of a window?
- Wanted: Free accomodation during WWDC
- Completion routines
- Version Control Software for the Mac
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The digest is a collection of articles from the internet newsgroup comp.sys.
- mac.programmer. It is designed for people who read c.s.m.p. semi-regularly
- and want an archive of the discussions. If you don't know what a newsgroup
- is, you probably don't have access to it. Ask your systems administrator(s)
- for details. (This means you can't post questions to the digest.)
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: rf27+@andrew.cmu.edu (Robert Bruce Findler)
- Subject: Apple Events
- Date: 12 Mar 92 19:10:33 GMT
- Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
-
- I'm having some problems. I want to send the Finder an event to open the
- application finger and here's what I'm trying:
-
- FSMakeFSSpec(0, 0, "\pBoysenberry:Finger", &file);
-
- finderID = 'MACS';
-
- err = AECreateDesc(typeApplSignature, (Ptr)&finderID, sizeof(OSType),
- &address);
-
- err = AECreateAppleEvent(kCoreEventClass, kAEOpenDocuments, &address,
- kAutoGenerateReturnID,kAnyTransactionID, &evt);
-
- err = AECreateList(0L, 0L, FALSE, &docs);
- err = AEPutPtr(&docs, 0, typeFSS, (Ptr)&file, sizeof(FSSpec));
-
- err = AEPutParamPtr(&evt, keyDirectObject, typeAEList, (Ptr)&docs,
- sizeof(AEDescList));
-
- err = AESend(&evt, &response, kAEWaitReply + kAENeverInteract,
- kAENormalPriority, 300, 0L, 0L);
-
- I get a timeout error on the AESend event. Thanks in advance.
-
- .................................................................
- : rf27+@andrew.cmu.edu : The fan awaits the shit, Madame. :
- : rfindler@oasys.dt.navy.mil : Moliere's, _The Misanthrope_ :
- :............................:...............................ECFO
-
- +++++++++++++++++++++++++++
-
- From: s_fuller@iastate.edu (Steve Fuller)
- Organization: Iowa State University, Ames IA
- Date: Fri, 27 Mar 1992 21:32:24 GMT
-
- Is there anywhere that I can ftp/snail-mail to get a free/cheap
- list of all the existing AppleEvents that are used in System
- 7.0????
-
-
- - --
- - ---------------------=---------------------------------------------------
- Steve Fuller = Critics are like eunuchs in a harem. They know
- Net.nerd = how it's done, they've seen it done every day,
- s_fuller@iastate.edu = but they're unable to do it themselves. B. Behan
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 27 Mar 92 22:44:19 GMT
- Organization: Apple Co.
-
- In article <8dk3Z9600Uh_E_WFFg@andrew.cmu.edu>, rf27+@andrew.cmu.edu (Robert Bruce Findler) writes:
- >
- > I'm having some problems. I want to send the Finder an event to open the
- > application finger and here's what I'm trying:
- > [code deleted...]
-
- You are all kinds of confused. Get the Apple Events Registry from
- ftp.apple.com and read the Finder Events chapter. Get my FinderEvents
- demo stack from /pub/pugh/hyperstuff on ftp.apple.com and check out the
- sample code.
-
- In short, the Finder sends OpenDocument events, it doesn't receive them.
- It takes its own special events, although that should change in the future.
-
- Jon
- kAERegistrar
-
- +++++++++++++++++++++++++++
-
- From: s_fuller@iastate.edu (Steve Fuller)
- Organization: Iowa State University, Ames IA
- Date: Fri, 27 Mar 1992 21:32:24 GMT
-
- Is there anywhere that I can ftp/snail-mail to get a free/cheap
- list of all the existing AppleEvents that are used in System
- 7.0????
-
-
- - --
- - ---------------------=---------------------------------------------------
- Steve Fuller = Critics are like eunuchs in a harem. They know
- Net.nerd = how it's done, they've seen it done every day,
- s_fuller@iastate.edu = but they're unable to do it themselves. B. Behan
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 27 Mar 92 22:44:19 GMT
- Organization: Apple Co.
-
- In article <8dk3Z9600Uh_E_WFFg@andrew.cmu.edu>, rf27+@andrew.cmu.edu (Robert Bruce Findler) writes:
- >
- > I'm having some problems. I want to send the Finder an event to open the
- > application finger and here's what I'm trying:
- > [code deleted...]
-
- You are all kinds of confused. Get the Apple Events Registry from
- ftp.apple.com and read the Finder Events chapter. Get my FinderEvents
- demo stack from /pub/pugh/hyperstuff on ftp.apple.com and check out the
- sample code.
-
- In short, the Finder sends OpenDocument events, it doesn't receive them.
- It takes its own special events, although that should change in the future.
-
- Jon
- kAERegistrar
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 3 Apr 92 20:30:17 GMT
- Organization: Apple Co.
-
- In article <s_fuller.701731944@vincent1.iastate.edu>, s_fuller@iastate.edu (Steve Fuller) writes:
- >
- > Is there anywhere that I can ftp/snail-mail to get a free/cheap
- > list of all the existing AppleEvents that are used in System
- > 7.0????
-
- There is no such list. We are currently compiling via questionaires a list
- of all AE aware programs for publication through the developer program, but
- it will be a printed version and not available through other channels due to
- price issues (I believe). I will see about getting the data and posting it
- when it becomes available.
-
- The problem is that any program can send/receive any AE, so the system doesn't
- know squat about it. As for AE that System 7 _supports_, these are only the
- four required events.
-
- Jon
- kAERegistrar
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 3 Apr 92 20:31:53 GMT
- Organization: Apple Co.
-
- In article <s_fuller.701731944@vincent1.iastate.edu>, s_fuller@iastate.edu (Steve Fuller) writes:
- >
- > Is there anywhere that I can ftp/snail-mail to get a free/cheap
- > list of all the existing AppleEvents that are used in System
- > 7.0????
-
- There is no such list. We are currently compiling via questionaires a list
- of all AE aware programs for publication through the developer program, but
- it will be a printed version and not available through other channels due to
- price issues (I believe). I will see about getting the data and posting it
- when it becomes available.
-
- The problem is that any program can send/receive any AE, so the system doesn't
- know squat about it. As for AE that System 7 _supports_, these are only the
- four required events which the Finder sends and the 23 events that the Finder
- accepts (which arenUt really AE, but close enough).
-
- Jon
- kAERegistrar
-
- ---------------------------
-
- From: kimd@hpcvlx.cv.hp.com (Kim Drongesen)
- Subject: MPW Problems Subclassing an Object Pascal Object in C++
- Date: 27 Mar 92 16:33:22 GMT
- Organization: Hewlett-Packard Co., Corvallis, OR, USA
-
- I am writing an application in C++, but linking in some Object Pascal modules.
- I have created a C++ class which is an subclass of one of the Object Pascal
- classes. The code compiles and links fine, and the correct methods are being
- called. However, if an instance variable is set in one of the subclass
- methods - it is invalid in the superclass methods and vice versa. When
- I look at the object in the debugger I'm using the instance variables look
- fine in one method - but then I call another and it says that all the
- variables are corrupt.
-
- I'm using MPW 3.0 Object Pascal and C++. I have created C++ headers for
- the Object Pascal modules. I then linked the Object Pascal modules together
- into a library and linked them into my C++ application.
-
- Any pointers in the right direction would be greatly appreciated!!
-
- Kim Drongesen
- kimd@cv.hp.com
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 2 Apr 92 18:55:16 GMT
- Organization: MacDTS Mongols
-
- In article <101780012@hpcvlx.cv.hp.com>, kimd@hpcvlx.cv.hp.com (Kim Drongesen)
- writes:
- >
- > I am writing an application in C++, but linking in some Object Pascal modules.
- > I have created a C++ class which is an subclass of one of the Object Pascal
- > classes. The code compiles and links fine, and the correct methods are being
- > called. However, if an instance variable is set in one of the subclass
- > methods - it is invalid in the superclass methods and vice versa. When
- > I look at the object in the debugger I'm using the instance variables look
- > fine in one method - but then I call another and it says that all the
- > variables are corrupt.
-
- I've seen this question before, and the resolution was that the
- superclass definitions were wrongly defined. Don't know
- about your case, in the classical sense a field in the superclass and
- sub-class is the same in the *instance* of the C++ class.
-
- Cheers,
- Kent
-
- - --
- Kent Sandvik/DTS - Dynamic Language Evangelist.
- Opinions expressed are private, and not owned by any company,
- organization or group. Happy happy, joy joy!
-
- ---------------------------
-
- From: kimd@hpcvlx.cv.hp.com (Kim Drongesen)
- Subject: MacApp Support Email Address
- Date: 27 Mar 92 16:53:44 GMT
- Organization: Hewlett-Packard Co., Corvallis, OR, USA
-
- I have heard that there is an email address to send questions to the
- MacApp support group. If you have it - could you please send it to
- me.
-
- Thanks in advance,
-
- Kim Drongesen
- kimd@cv.hp.com
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 2 Apr 92 18:52:30 GMT
- Organization: MacDTS Mongols
-
- In article <101780013@hpcvlx.cv.hp.com>, kimd@hpcvlx.cv.hp.com (Kim Drongesen)
- writes:
- >
- > I have heard that there is an email address to send questions to the
- > MacApp support group. If you have it - could you please send it to
- > me.
-
- There are two developer mailing lists on AppleLink just now which deals with
- MacApp questions, MacApp2Tech$ and MacApp3Tech$. Some internet sites
- also have gateways to these lists, but I don't have any information
- how this is arranged. CompuServe also has a newsgroup for MacApp
- issues, ditto with America Online and maybe other BBs I'm not aware
- of.
-
- MACDTS supports MacApp developers, however we are talking about
- Apple partners.
-
- Another issue, if there would be enough interest and need, maybe
- comp.sys.mac.programmer should have sub-groups, style c.s.m.p.oops
- but that's another story.
-
- Cheers,
- Kent
- - --
- Kent Sandvik/DTS - Dynamic Language Evangelist.
- Opinions expressed are private, and not owned by any company,
- organization or group. Happy happy, joy joy!
-
- ---------------------------
-
- From: andre@speedy.cs.pitt.edu (Andre "Just A Plumber" Srinivasan)
- Subject: q: why can't i see all my functions in macsbug?
- Date: 27 Mar 92 22:43:51 GMT
- Organization: Acme Plumbing Services And Exploding Cigars
-
-
- if i'm in a function that lives in code resource #4 and i list the
- functions via cmd-d, i can't see the functions in code resource #2. i
- can't break on the function either.
-
- how do i trick macsbug to show me the symbols that are defined in
- another code resource?
-
- thanks.
-
- -andre.
- - --
- Andre Srinivasan : "This file provides programmers with information
- 734 LRDC : proving that it really was a hardware problem..."
- U. of Pittsburgh :
- andre@cs.pitt.edu : - MacsBug Ballon Help
-
- +++++++++++++++++++++++++++
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Date: 3 Apr 92 04:43:36 GMT
- Organization: MacDTS, Apple Computer
-
- In article <ANDRE.92Mar27174351@speedy.cs.pitt.edu>, andre@speedy.cs.pitt.edu (Andre "Just A Plumber" Srinivasan) writes:
- >
- >
- > if i'm in a function that lives in code resource #4 and i list the
- > functions via cmd-d, i can't see the functions in code resource #2. i
- > can't break on the function either.
- >
- > how do i trick macsbug to show me the symbols that are defined in
- > another code resource?
-
- It's deja vu all over again....
-
- You can't; MacsBug will only look at memory, not at disk. You may want to
- try marking your CODE segments 'Preload' with ResEdit (or link can do it,
- if you're using MPW). Then they'll all start out as loaded, so you can
- break easily. Or, set the byte at loadtrap ($12C). The segment loader
- will now break into MacsBug when a segment gets loaded. Every time one
- is, you can check to see if your function is around yet.
-
- Tim Dierks
- MacDTS, but my socks stay dry
-
- ---------------------------
-
- From: time@ice.com (Tim Endres)
- Subject: What is the Serial Port Arbitrator?!
- Date: 30 Mar 92 15:33:37 GMT
- Organization: ICE Engineering, Inc.
-
-
- Can anyone tell me what the Serial Port Arbitrator is?!
-
- Will it let my various CTB apps share the serial port for logins?
- I.e. can it ask the connecting party what app they wish to connect
- to and then satisfy the CMListen for that app? Or does it just tell
- me when other apps have the port?
-
- tim.
-
-
- tim endres - time@ice.com -or- uupsi!tbomb!time
- ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
- 8840 Main Street, Whitmore Lake, MI 48189
- USENET - a slow moving self parody... ph
-
- +++++++++++++++++++++++++++
-
- From: MacUserLabs@cup.portal.com (Stephan - Somogyi)
- Date: 30 Mar 92 19:12:28 GMT
- Organization: The Portal System (TM)
-
- time@ice.com (Tim Endres) writes:
-
- >Can anyone tell me what the Serial Port Arbitrator is?!
-
- I'm assuming you mean the thing that lives in the Extensions folder and
- has a type/creator of LTMC/gsrp. It's part of AppleTalk Remote Access and
- watches for when it can take over the serial port again to enable
- auto-answer.
-
- _____________________________________________________________________
- Stephan Somogyi Getting To The Bottom Of It All MacUser
-
- +++++++++++++++++++++++++++
-
- From: glenn@gla-aux.uucp (Glenn Austin)
- Date: Wed, 1 Apr 92 23:07:25 PST
- Organization: The Pit Lane
-
-
- In article <1CE00001.vp7o1i@tbomb.ice.com> (comp.sys.mac.programmer,comp.sys.mac.comm), time@ice.com (Tim Endres) writes:
- >
- > Can anyone tell me what the Serial Port Arbitrator is?!
- >
- > Will it let my various CTB apps share the serial port for logins?
- > I.e. can it ask the connecting party what app they wish to connect
- > to and then satisfy the CMListen for that app? Or does it just tell
- > me when other apps have the port?
-
- It's part of ARA that allows ARA to use the port when a comm application
- isn't.
-
- The only problem is -- you have to patch the Serial and Modem tools to get
- them to work with ARA...
-
- The good news -- I've already done this for the Serial tool. I can let
- you know what and where to patch, if necessary.
-
- ===============================================================================
- | Glenn L. Austin | "Turn too soon, run out of room. |
- | Macintosh Wizard and | Turn too late, much better fate." |
- | Auto Racing Driver | -- Jim Russell Racing School Instructors |
- | Usenet: glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu |
- ===============================================================================
-
- +++++++++++++++++++++++++++
-
- From: werner@cs.utexas.edu (Werner Uhrig)
- Date: 2 Apr 92 10:28:46 GMT
- Organization: CS Dept, University of Texas at Austin
-
- In <1CE00001.vvslcg@gla-aux.uucp> glenn%gla-aux.uucp@skinner.cs.uoregon.edu writes:
-
- >> Can anyone tell me what the Serial Port Arbitrator is?!
- >It's part of ARA that allows ARA to use the port when a comm application
- >isn't. The only problem is -- you have to patch the Serial and Modem tools
- >to get them to work with ARA...
- >The good news -- I've already done this for the Serial tool. I can let
- >you know what and where to patch, if necessary.
-
- Glenn, you have my FULL attention. I have been cursing
- about "something" which keeps interfering with my using
- the Global ADB-modem (emulating the printer port) while
- having LocalTalk connections on the physical printer port,
- and ARA installed (but not even active); what you mention
- here sounds just like the "elusive bug" I have been on the
- look-out for. Tell me more, please !! (and please don't
- forget to x-post to csm.comm - I am not paying attention
- to csm.programmer these days)
- - --
- --(werner@rascal.ics.utexas.edu)--*OR*--(...!uunet!cs.utexas.edu!werner)--
- Definition of Foreign Aid:
- "The transfer of money from poor people in rich countries
- to rich people in poor countries" ---Unknown, probably dead...
-
- +++++++++++++++++++++++++++
-
- From: MacUserLabs@cup.portal.com (Stephan - Somogyi)
- Date: 2 Apr 92 17:27:30 GMT
- Organization: The Portal System (TM)
-
- glenn@gla-aux.uucp (Glenn Austin) writes:
-
- >The only problem is -- you have to patch the Serial and Modem tools to
- >get them to work with ARA...
-
- I don't know about the Serial Tool (having never used it) but as far as I
- know, the Apple Modem Tool 1.1 and later (1.1.1 being the current rev)
- understands about the Arbiter. Also, with the pre-1.1 tool you can hold
- down option and override; this works well.
-
- _____________________________________________________________________
- Stephan Somogyi Getting To The Bottom Of It All MacUser
-
- +++++++++++++++++++++++++++
-
- From: MacUserLabs@cup.portal.com (Stephan - Somogyi)
- Date: 2 Apr 92 17:35:01 GMT
- Organization: The Portal System (TM)
-
- werner@cs.utexas.edu (Werner Uhrig) writes:
-
- >Glenn, you have my FULL attention. I have been cursing about "something"
- >which keeps interfering with my using the Global ADB-modem (emulating the
- >printer port) while having LocalTalk connections on the physical printer
- >port, and ARA installed (but not even active); what you mention here
- >sounds just like the "elusive bug" I have been on the look-out for.
-
- Werner, could you please clarify "interfering with my using the GV
- ADB-modem"? What doesn't work? What are you trying to do?
-
- I have ARA installed, a Global Village FullFax set up to be in CTB mode,
- and a T3000 connected to my modem port, all working together (or
- independently, as the case may be) without problems.
-
- _____________________________________________________________________
- Stephan Somogyi Getting To The Bottom Of It All MacUser
-
- +++++++++++++++++++++++++++
-
- From: glenn@gla-aux.uucp (Glenn Austin)
- Date: Fri, 3 Apr 92 13:24:26 PST
- Organization: The Pit Lane
-
-
- In article <56773@cup.portal.com> (comp.sys.mac.programmer,comp.sys.mac.comm), MacUserLabs@cup.portal.com (Stephan - Somogyi) writes:
- > glenn@gla-aux.uucp (Glenn Austin) writes:
- >
- > >The only problem is -- you have to patch the Serial and Modem tools to
- > >get them to work with ARA...
- >
- > I don't know about the Serial Tool (having never used it) but as far as I
- > know, the Apple Modem Tool 1.1 and later (1.1.1 being the current rev)
- > understands about the Arbiter. Also, with the pre-1.1 tool you can hold
- > down option and override; this works well.
-
- The problem is when you have the cmQuiet bit set -- you don't GET the dialog
- for overriding the use of the port.
-
- And no, not using the cmQuiet bit is not an option in some cases...
-
- ===============================================================================
- | Glenn L. Austin | "Turn too soon, run out of room. |
- | Macintosh Wizard and | Turn too late, much better fate." |
- | Auto Racing Driver | -- Jim Russell Racing School Instructors |
- | Usenet: glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu |
- ===============================================================================
-
- ---------------------------
-
- From: omh@cs.brown.edu (Owen M. Hartnett)
- Subject: Speaking of WWDC, how about a netter's dinner?
- Date: 1 Apr 92 01:28:54 GMT
- Organization: Brown University Department of Computer Science
-
- Netter's dinner has always been a highlight of any of the MacWorlds and
- WWDCs. I'm hoping that the individuals who have organized these in
- the past (or perhaps some would be organizers) would see fit to organize
- them again.
-
- If you're looking for suggested places, Gordon Biersch (sp?) was great last
- time. It may be too late to book some places, especially since Thursday
- seems to be the only night with nothing planned in the evening hours.
-
- - -Owen
-
- Owen Hartnett omh@cs.brown.edu
- "FAITH, n. Belief without evidence in what is told by one who speaks
- without knowledge, of things without parallel."
- -Ambrose Bierce - The Devil's Dictionary
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 1 Apr 92 21:34:41 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .brown.edu> omh@cs.brown.edu (Owen M. Hartnett) writes:
-
- If you're looking for suggested places, Gordon Biersch (sp?) was great last
- time. It may be too late to book some places, especially since Thursday
- seems to be the only night with nothing planned in the evening hours.
-
- They served the best beer I had while in the US last time...
- I second the motion !
-
- I just hope we don't collide with the A/UX group again :-(
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: peirce@outpost.SF-Bay.org (Michael Peirce)
- Date: Thu, 2 Apr 92 07:40:54 PST
- Organization: Peirce Software
-
- In article <1992Apr1.012854.22975@cs.brown.edu> (comp.sys.mac.programmer), omh@cs.brown.edu (Owen M. Hartnett) writes:
- > Netter's dinner has always been a highlight of any of the MacWorlds and
- > WWDCs. I'm hoping that the individuals who have organized these in
- > the past (or perhaps some would be organizers) would see fit to organize
- > them again.
- >
- > If you're looking for suggested places, Gordon Biersch (sp?) was great last
- > time. It may be too late to book some places, especially since Thursday
- > seems to be the only night with nothing planned in the evening hours.
-
- Well, I'll coordinate it again this year if no one else is game (if
- someone *is* interested, speak up, and I'll step aside!).
-
- Let's try for Thursday night as suggested.
-
- I'll talk to Gorden Biersch in the next few days to see if they can
- accomidate us again.
-
- Please send me email if you expect to attend so I can give Gorden
- Biersh an approximate head count.
-
- - -- Michael Peirce -- peirce@outpost.SF-Bay.org
- - -- Peirce Software -- Suite 301, 719 Hibiscus Place
- - -- Macintosh Programming -- San Jose, California USA 95117
- - -- & Consulting -- voice: (408) 244-6554 fax: (408) 244-6882
- - -- -- AppleLink: peirce & America Online: AFC Peirc>e
-
- ---------------------------
-
- From: jamesm@gemma.cs.rpi.edu (Michael James)
- Subject: Do I get Null events in fg?
- Date: 1 Apr 92 05:15:42 GMT
- Organization: Rensselaer Polytechnic Institute, Troy NY
-
- I am trying to learn how to program the Macintosh and typed in the
- Event Tutor program from Mark and Cartwright's book (I can't remember
- the title at the moment). Everything seems to work as expected except
- for the following: When I tell WaitNextEvent that I want to receive
- "everyEvent" it will give me all the events I am expecting except for
- Null Events. I get one when I first start the program and then don't
- get any more. However, if I click on the root window to switch the
- Finder (or whatever we're supposed to call it in System 7-speak) to
- the foreground, I get about 6 or 7 null events and then nothing else.
- When I switch the EventTutor program back to the foreground I get
- another null event.
-
- I was expecting to get a continuous stream of null events when I ran
- the program. I did not. I did find, however, that if I give
- WaitNextEvent an event mask of 0 (zero, that is) I get loads of null
- events and it takes so much time to process them that I cannot regain
- control of the machine and have to reboot. Inside Machintosh
- describes the event mask of zero as 'unused.'
-
- My questions:
-
- 1) What's the deal? Why am I not getting a continuous stream of null
- events when I give WaitNextEvent an event mask of 'everyEvent?' What
- is the even mask of zero?
-
- 2) If the foreground process doesn't get these null events, what is
- the accepted way of doing something like updating a clock or some
- other display in the foreground which must be updated regardless of
- whether any user-generated events are received?
-
- 3) If you know the answer to questions 1 and 2, where did you find the
- answer? I have RTFMed Inside Macintosh and Dave Mark's Primer books
- and anything else I could get my hands on (I didn't find anything in
- the technical notes, but I seem to have trouble finding anything in
- them anyway, so I might have missed it) and had no luck.
-
- I am using THINK C 5.0.2 under System 7.0.1 with Tune-up.
-
- Also, I am a fairly experienced programmer with a decent amount of
- experience with writing event driven software. Event driven
- programming isn't giving me problems; null events and the Macintosh OS
- are. (No flames; I own a Mac :-)
-
- Thanks in advance,
-
- Mike
-
- - --------------------------------------------------------------------
- Michael James Rensselaer Polytechnic Institute
- jamesm@cs.rpi.edu
- - --------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: dougm@bradbury.cns.caltech.edu (Doug McNought)
- Date: 1 Apr 92 06:32:02 GMT
- Organization: California Institute of Technology
-
- In article <5+vts6#@rpi.edu> jamesm@gemma.cs.rpi.edu (Michael James) writes:
- >I am trying to learn how to program the Macintosh and typed in the
- >Event Tutor program from Mark and Cartwright's book (I can't remember
- >the title at the moment). Everything seems to work as expected except
- >for the following: When I tell WaitNextEvent that I want to receive
- >"everyEvent" it will give me all the events I am expecting except for
- >Null Events. I get one when I first start the program and then don't
- >get any more. However, if I click on the root window to switch the
- >Finder (or whatever we're supposed to call it in System 7-speak) to
- >the foreground, I get about 6 or 7 null events and then nothing else.
- >When I switch the EventTutor program back to the foreground I get
- >another null event.
-
- What sleep value are you passing to WNE? If you pass nonzero, MF will give
- time to background processes instead of wasting time giving you null events.
- If you pass zero you should get a stream of null events and waste a lot of
- CPU.
-
- >I was expecting to get a continuous stream of null events when I ran
- >the program. I did not. I did find, however, that if I give
- >WaitNextEvent an event mask of 0 (zero, that is) I get loads of null
- >events and it takes so much time to process them that I cannot regain
- >control of the machine and have to reboot. Inside Machintosh
- >describes the event mask of zero as 'unused.'
- >
- >My questions:
- >
- >1) What's the deal? Why am I not getting a continuous stream of null
- >events when I give WaitNextEvent an event mask of 'everyEvent?' What
- >is the even mask of zero?
-
- As I said above, check your sleep parameter. The zero mask means "Don't
- give me any meaningful events--leave them in the queue." Eventually the queue
- fills up. This could easily cause you to hang.
-
- >2) If the foreground process doesn't get these null events, what is
- >the accepted way of doing something like updating a clock or some
- >other display in the foreground which must be updated regardless of
- >whether any user-generated events are received?
-
- Say you're updating a clock. You pass 60 to WNE for the sleep parameter,
- which means you get woken up at least once a second (unless some CPU hog
- is running in the background :-( ). Every time through the event loop just
- check TickCount() for whether the display needs updating. Note that you don't
- have to use this mechanism if all you're doing is changing the cursor--you
- can use WNE's mouseRgn for that.
-
- >3) If you know the answer to questions 1 and 2, where did you find the
- >answer? I have RTFMed Inside Macintosh and Dave Mark's Primer books
- >and anything else I could get my hands on (I didn't find anything in
- >the technical notes, but I seem to have trouble finding anything in
- >them anyway, so I might have missed it) and had no luck.
-
- The Event Manager chapter of IM6 is reasonably clear on this--see
- page 5-29. I kind of picked it up by osmosis from MacTutor, skimming
- though Chernicoff, etc. I don't know the Mark/Cartwright book but it
- seems as if they could be clearer on this--it's not really that hard.
- regards,
- doug
- - --
- <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
- <> Doug McNaught dougm@descartes.caltech.edu <>
- <> Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
- <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 2 Apr 92 08:24:26 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .caltech.edu> dougm@bradbury.cns.caltech.edu (Doug McNought) writes:
-
- is running in the background :-( ). Every time through the event loop just
- check TickCount() for whether the display needs updating. Note that you
-
- Nah, that's a waste. Use the "when" field of the event record instead !
-
- >3) If you know the answer to questions 1 and 2, where did you find the
- >answer? I have RTFMed Inside Macintosh and Dave Mark's Primer books
- >and anything else I could get my hands on (I didn't find anything in
- >the technical notes, but I seem to have trouble finding anything in
- >them anyway, so I might have missed it) and had no luck.
-
- The Event Manager chapter of IM6 is reasonably clear on this--see
- page 5-29. I kind of picked it up by osmosis from MacTutor, skimming
-
- Also, the Tech Notes come in hypercard stack form, and you can search
- through it using nice indexes. That's the only way to actually get any
- use out of the tech notes. Try searching for "MultiFinder" and/or
- "WaitNextEvent" for instance.
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- ---------------------------
-
- From: bach@sun1.ruf.uni-freiburg.de (Michael Bach)
- Subject: using PixMapHandle^ with CopyBits (Pascal)?
- Date: 1 Apr 92 08:37:20 GMT
- Organization: Rechenzentrum der Universitaet Freiburg, Deutschland
-
-
- Dear colleagues:
- May I pose the following problem: In IM VI you are warned not
- to dereference GWorld-PixMap handles, but rather do as follows:
- var
- pixBase: PixMapHandle;
- begin
- ....
- pixBase := GetGWorldPixMap(OffPortPtr);
- CopyBits(pixBase^, GrafPtr(currPort)^.portBits,
- OffRect, OnRect, ditherCopy, nil);
- However, ThinkPascal (4.01) complains about incompatible typing.
- The common-and-garden version works (see also TN#120):
- CopyBits(GrafPtr(OffPortPtr)^.portBits,
- GrafPtr(currPort)^.portBits,
- OffRect, OnRect, ditherCopy, nil);
- Of course, a pixBase^ is something different than a BitMap, but
- somewhere in IM IV it says that the type for CopyBits has been
- relaxed. So is it just a problem of Think Pascal?
- Hoping to have made myself clear (I did try to avoid the tell-tale
- German long-and-winding sentences),
- Michael.
- - --
- Dr. Michael Bach, Opthalmological Dept.,
- University of Freiburg, D-7800 Freiburg, Germany
-
- +++++++++++++++++++++++++++
-
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Organization: Kalamazoo College
- Date: Wed, 1 Apr 1992 14:23:08 GMT
-
- bach@sun1.ruf.uni-freiburg.de (Michael Bach) writes:
- >
- >var
- > pixBase: PixMapHandle;
- >
- >pixBase := GetGWorldPixMap(OffPortPtr);
- >CopyBits(pixBase^, GrafPtr(currPort)^.portBits,
- > OffRect, OnRect, ditherCopy, nil);
- >
- >However, ThinkPascal (4.01) complains about incompatible typing.
- >
- >Of course, a pixBase^ is something different than a BitMap, but
- >somewhere in IM IV it says that the type for CopyBits has been
- >relaxed. So is it just a problem of Think Pascal?
-
- It's a problem in any typed language. The CopyBits expects a @BitMap,
- so you'll have to cast it to that before you pass it. The toolbox can
- still tell it's really a PixMap because the hi bit of rowBytes will be
- set. (This kind of kludge is what happens when engineers have to turn a
- 1-bit graphics toolbox into a 48-bit graphics toolbox...)
- - --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
-
- ---------------------------
-
- From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
- Subject: How to find the location of a window?
- Organization: SF-Bay Public-Access Unix
- Date: Wed, 1 Apr 1992 08:26:35 GMT
-
- []
-
- How does one go about finding the location of a window?? I am getting
- the portRect, but the top and left fields are always zero.
-
- mike
-
- - --
- "There is no problem too big that can't be solved with high explosives"-Rush
-
- Mike Smithwick - ames!zorch!mike
-
-
- +++++++++++++++++++++++++++
-
- From: jcav@quads.uchicago.edu (JohnC)
- Organization: The Royal Society for Putting Things on Top of Other Things
- Date: Wed, 1 Apr 1992 17:07:24 GMT
-
- In article <1992Apr1.082635.27613@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes:
- >How does one go about finding the location of a window?? I am getting
- >the portRect, but the top and left fields are always zero.
-
- The portRect boundary is in the window's local coordinate system. To find
- its global location, simply make sure that the window is the current port
- (by using _SetPort), then pass the portRect.topLeft to the _LocalToGlobal
- procedure. See IM-I,193.
-
- - --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 2 Apr 92 08:41:43 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes:
-
- How does one go about finding the location of a window?? I am getting
- the portRect, but the top and left fields are always zero.
-
-
- // Return, in global coordinates, the location of a windows
- // top-left corner (which is not always the windows origin)
- Point
- WindowLocation ( WindowPtr window )
- {
- GrafPtr oldPort ;
- Point p ;
-
- GetPort ( & oldPort ) ; // Save old port to restore later
- SetPort ( window ) ; // We want to use the port in question
-
- p = * ( Point * ) & ( window -> portRect ) ;
- // The portRects topleft is the windows
- // topleft in local coordinates. This may
- // change from 0,0 when you SetOrigin.
-
- LocalToGlobal ( & p ) ; // This is the magic call - pretty simple
-
- SetPort ( oldPort ) ; // Remember to clean up
- return p ; // And we're done
- }
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- ---------------------------
-
- From: breidenb@Informatik.TU-Muenchen.DE (Oliver Breidenbach)
- Subject: Wanted: Free accomodation during WWDC
- Organization: Technische Universitaet Muenchen, Germany
- Date: Wed, 1 Apr 1992 15:30:36 GMT
-
-
- Hi netters,
-
- I and my brother do have the opportunity to go to San Jose in May and attend
- the WWDC. The flight and the entrance fees would be paid by the company we
- work for, but not the accommodation. (Bad luck).
- Since we are both students and want to spend some time after the WWDC to visit
- the Yosemite national park we are looking for some very cheap (better yet: free)
- place to sleep from April, 9th to April, 16th.
- If you are interessted to host two young mac enthusiasts during that period,
- please e-mail me.
- Thanks for your interest.
-
- Oliver.
-
- (breidenb@informatik.tu-muenchen.de)
-
- +++++++++++++++++++++++++++
-
- From: breidenb@Informatik.TU-Muenchen.DE (Oliver Breidenbach)
- Date: 2 Apr 92 06:48:10 GMT
- Organization: Technische Universitaet Muenchen, Germany
-
- Oh, damn. I hate to do this: ;-)
-
- I wrote:
-
- >Since we are both students and want to spend some time after the WWDC to visit
- >the Yosemite national park we are looking for some very cheap (better yet: free)
- >place to sleep from April, 9th to April, 16th.
-
- That is May, of course, not April.
-
- Please forgive me. :-)
-
- Cheers,
- Oliver.
-
- ---------------------------
-
- From: rps32513@uxa.cso.uiuc.edu (Ronald P. Smith)
- Subject: Completion routines
- Organization: University of Illinois at Urbana
- Date: Wed, 1 Apr 1992 20:34:41 GMT
-
- I'm having problems with a completion routine I'm trying to implement.
- The function is a search function, it reads in a portion of a file, and
- according to what it gets, reads another portion. Each read is
- asynchronous, and the completion routine passed is the function itself.
- Basically, I have a completion function passing itself as a copletion
- function to a file mgr routine. well, my function dies when it's all done
- with a strange os err (different each time). I suspect my setting up
- a completion function from within a completion function is a no-no,
- am I doing something wrong?
-
- any and all help would be appreciated.
-
- - --RS Ron Smith (rps32513@uxa.cso.uiuc.edu)
-
- +++++++++++++++++++++++++++
-
- From: rmh@taligent.com (Rick Holzgrafe)
- Date: 2 Apr 92 22:07:32 GMT
- Organization: Taligent
-
- In article <1992Apr1.203441.12142@ux1.cso.uiuc.edu>, rps32513@uxa.cso.uiuc.edu
- (Ronald P. Smith) writes:
- >
- > I'm having problems with a completion routine I'm trying to implement.
- > The function is a search function, it reads in a portion of a file, and
- > according to what it gets, reads another portion. Each read is
- > asynchronous, and the completion routine passed is the function itself.
- > Basically, I have a completion function passing itself as a copletion
- > function to a file mgr routine. well, my function dies when it's all done
- > with a strange os err (different each time). I suspect my setting up
- > a completion function from within a completion function is a no-no,
- > am I doing something wrong?
- >
- > any and all help would be appreciated.
- >
- > --RS Ron Smith (rps32513@uxa.cso.uiuc.edu)
-
-
- This sort of thing can work in networking, if you do it right. I'm less certain
- about async file system calls, but I suspect that if (as you say) it is working
- up until the stack unwinds, it can be fixed.
-
- But first I have an alternate suggestion. Instead of using completion routines,
- why not simply poll the ioResult flag in your event loop? When the latest async
- call is complete, call a handler routine from the event loop, and let it process
- the results and set up the next async call if necessary. This avoids the entire
- snake's nest of completion routines, and costs almost nothing. You may fear a
- slowdown because the event loop may be busy doing other things; but if it is,
- it's because the user told it to, and interaction with the user should have
- first priority anyway. (If the user has walked away from the Mac, you could get
- a slowdown while waiting for WaitNextEvent to give you some idle time. Combat
- that by passing a small sleep interval to WaitNextEvent when you have async
- calls pending, and a longer one when you don't.)
-
- If you feel you must chain, here are some things to watch out for.
-
- 1. Your completion routine is fundamentally recursive. Just because you make a
- call asynchronously doesn't mean it will happen later; it could complete
- immediately, before the call (or the caller) has a chance to return. This means
- that the completion routine's code *must* be re-entrant. One way to assure this
- is to make the chaining call the last thing your completion routine does before
- returning. (It's okay to re-use the parameter block, if you are otherwise done
- with it.)
-
- 2. Again, your completion routine is recursive; this means it could potentially
- chew up a lot of stack. Try to minimize the size and number of local variables
- you create. This is especially important because a completion routine can never
- be sure whose stack it's using. If your routine gets called while some other app
- with a tiny stack is getting some background time, you can easily bomb that app
- as well as your own.
-
- 3. Remember that completion routines may NOT make any calls that could move or
- purge memory. This has nothing to do with chaining; it's always true. (And
- forgive me if you know this already; it's such an easy trap to fall into.)
-
- Disclaimer: This stuff works great with networking calls. I've never tried it
- with file system calls.
-
- Hope this helps.
-
-
-
- ---------------------------
-
- From: jbtubman@skyler.arc.ab.ca (Jim Tubman)
- Subject: Version Control Software for the Mac
- Organization: Alberta Research Council
- Date: 1 Apr 92 15:40:53
-
- Can anyone direct me to a version control software package for the
- Mac, analogous to PVCS for MS-DOS or RCS for Unix? Ideally it should
- work with a HyperCard stack I am developing (that is, the software
- item that needs to be under version control is a HyperCard stack).
-
- - --
- - -------------------------------------------------------------------------------
- James B. Tubman Alberta Research Council
- Research Officer Advanced Computing & Engineering Dept.
- jbtubman@arcsun.arc.ab.ca 3rd Floor
- jbtubman@noah.arc.ab.ca 6815 - 8 Street NE
- Phone: (403) 297-7590 Calgary, Alberta
- Fax: (403) 275-3003 Canada T2E 7H7
- - -------------------------------------------------------------------------------
- "The squid is no longer responding to the mind control! Aaiiiieeeee!"
- - -------------------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: mshields@jgravesnext.nurs.utah.edu (Mike Shields)
- Date: 2 Apr 92 20:25:50 GMT
- Organization: University of Utah Computer Center
-
- In article <JBTUBMAN.92Apr1154053@skyler.arc.ab.ca> jbtubman@skyler.arc.ab.ca
- (Jim Tubman) writes:
- > Can anyone direct me to a version control software package for the
- > Mac, analogous to PVCS for MS-DOS or RCS for Unix? Ideally it should
- > work with a HyperCard stack I am developing (that is, the software
- > item that needs to be under version control is a HyperCard stack).
- >
-
- For anyone looking for version control for the Macintosh, check out Version
- Master from Astar Technologies. This lets you track versions of any Macintosh
- file (Source code, stacks, MS Word docs, etc.). Yuo can recieve a demo copy
- from Astar. The demo lets you use any feature of the software, but oly lets you
- keep three versions of the document. Try it.
-
- Astar can be contacted at:
- AppleLink - astar.dev@applelink.apple.com
- Phone - (508) 486-8532
- Fax - (508) 486-9757
-
- Disclaimer: This is my father's company.
- - --
- # Mike Shields | REPLY TO ->
- # Research Assistant | mshields@peruvian.utah.edu
- # U of Utah. College of Nursing | mshields@jgravesnext.nurs.utah.edu
- #include <stddisclaimer.h> | ^^ This one is NeXTmail.
-
- +++++++++++++++++++++++++++
-
- From: peirce@outpost.SF-Bay.org (Michael Peirce)
- Date: 3 Apr 92 04:53:13 GMT
- Organization: Peirce Software
-
-
- In article <JBTUBMAN.92Apr1154053@skyler.arc.ab.ca> (comp.sys.mac.programmer), jbtubman@skyler.arc.ab.ca (Jim Tubman) writes:
- > Can anyone direct me to a version control software package for the
- > Mac, analogous to PVCS for MS-DOS or RCS for Unix? Ideally it should
- > work with a HyperCard stack I am developing (that is, the software
- > item that needs to be under version control is a HyperCard stack).
-
- The two solutions I know about are Projector and VersionMaster.
-
- Projector is part of MPW and is excellent at controlling text oriented
- files. If can handle other file types but not particularly efficiently.
-
- VersionMaster, from Astar Technologies, Inc., works with all file
- types and doesn't depend on MPW. They just released version 1.1 with
- many improvements to the usser interface. The announement was in
- MacWeek a couple of weeks back.
-
- Projector/MPW can be had from APDA.
-
-
- VersionMaster can be had from some mail order houses and directly
- from Astar.
-
- Astar Technologies Inc.
- P.O. Box 1100
- Littleton MA 01460
- (508) 486-9757
-
- - -- Michael Peirce -- peirce@outpost.SF-Bay.org
- - -- Peirce Software -- Suite 301, 719 Hibiscus Place
- - -- Macintosh Programming -- San Jose, California USA 95117
- - -- & Consulting -- voice: (408) 244-6554 fax: (408) 244-6882
- - -- -- AppleLink: peirce & America Online: AFC Peirce
-
- +++++++++++++++++++++++++++
-
- From: randall@dciem.dciem.dnd.ca (Allan F. Randall)
- Date: 3 Apr 92 20:53:41 GMT
- Organization: Defence and Civil Institute of Environmental Medicine
-
- In article <JBTUBMAN.92Apr1154053@skyler.arc.ab.ca> jbtubman@skyler.arc.ab.ca (Jim Tubman) writes:
- >Can anyone direct me to a version control software package for the
- >James B. Tubman Alberta Research Council
-
- Check out SaveAll, a version control CDEV. It seems pretty good. It is
- available from shareware sources as a fully functional DEMO that expires after
- 30 days. The registration fee is typical of shareware.
-
- - ------------------------------------
- Allan Randall
- NTT Systems, Inc.
- Toronto, ON
- (416) 635-2156 (work)
- (416) 658-6495 (home)
- Internet: randall@dciem.dciem.dnd.ca
- CompuServe: 72057,1176
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-